Skip to content

Conversation

@mayankansys
Copy link
Collaborator

@mayankansys mayankansys commented Oct 16, 2025

Context

The library was showing deprecation warnings for DATAMODEL_USE_STATE_CACHE and field_info when starting a session. These warnings were noisy but didn’t break anything.

Change Summary

  • self.field_data creation updated to use _field_info instead of field_info.
  • self.field_data_old creation updated similarly.

Rationale

Using _field_info stops the deprecation warnings while keeping the code working the same.

Impact

  • Removes deprecation warnings from logs.
  • No changes to functionality or external APIs.

@Copilot Copilot AI review requested due to automatic review settings October 16, 2025 04:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Replaces internal service constructor arguments to use the private _field_info attribute instead of the public field_info, likely to avoid emitting deprecation warnings internally.

  • Swap of field_info with _field_info in two service creator calls.
  • Aligns internal usage with new deprecation handling strategy.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

self.field_data = service_creator("field_data").create(
_session._field_data_service,
self.field_info,
self._field_info,
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Swapping to the private _field_info likely avoids triggering the deprecation warning emitted by the public field_info accessor; consider adding a brief inline comment to document that intent for future maintainers.

Copilot uses AI. Check for mistakes.
Comment on lines 521 to 522
self.field_data_old = service_creator("field_data_old").create(
_session._field_data_service,
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Same as line 513: add a short comment explaining use of the private _field_info to prevent internal deprecation noise.

Suggested change
self.field_data_old = service_creator("field_data_old").create(
_session._field_data_service,
# Use of the private _field_info prevents internal deprecation noise.
self.field_data_old = service_creator("field_data_old").create(

Copilot uses AI. Check for mistakes.
@github-actions github-actions bot added the bug Issue, problem or error in PyFluent label Oct 16, 2025
@mayankansys mayankansys linked an issue Oct 16, 2025 that may be closed by this pull request
@mayankansys mayankansys changed the title Fix: Updated field_info to handle deprecated warnings. fix: Updated field_info to handle deprecated warnings. Oct 16, 2025
@Copilot Copilot AI review requested due to automatic review settings October 20, 2025 05:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@@ -0,0 +1 @@
Updated field_info to handle deprecated warnings.
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 'deprecation warnings' instead of 'deprecated warnings' for correct terminology.

Suggested change
Updated field_info to handle deprecated warnings.
Updated field_info to handle deprecation warnings.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue, problem or error in PyFluent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecation warnings inside the library

5 participants